package dataframeoperation

import org.apache.spark.sql.SparkSession

import java.io.File

object Basic {
  private val spark: SparkSession = SparkSession
    .builder()
    .master("local[*]")
    .appName("DataFrame Operations")
    .getOrCreate()

  import spark.implicits._

  def main(args: Array[String]): Unit = {
    val base_path = new File("").getAbsolutePath
    val personDF = spark.read.csv("file:///" + base_path + "/src/person.txt")
    personDF.show(20)
  }
}
